import request from '@/common/js/request.js'
// 查询法律发布机关 API接口
const law_pubunit_Api = {
  list: '/law_pubunit/list',
  listAll: '/law_pubunit/allList', 
  exportExcel: '/law_pubunit/output',
  delete: '/law_pubunit/delete',
  save: '/law_pubunit/save'
}

/**
 *  查询法律发布机关分页数据接口
 * @param {law_pubunit_Api} body
 * @returns
 */
export function getLawPubunitPage(body) {
  return request({
    url: law_pubunit_Api.list,
    method: 'post',
    data: body
  })
}

/**
 *  查询法律发布机关全部数据接口
 * @param {*} body 
 * @returns 
 */
export function getAllPubunitList(body) {
  return request({
    url: law_pubunit_Api.listAll,
    method: 'post',
    data: body
  })
}


/**
 * 导出法律发布机关excel接口
 * @param {*} body 
 */
export function exportExcel(body) {
  return request({
    url: law_pubunit_Api.list,
    method: 'post',
    data: body,
    responseType: 'blob'
  })
}

/**
 * 删除法律发布机关分页数据接口
 * @param {apl_admreview_Api} params 
 * @returns 
 */
export function deleteLawPubunit(params) {
  return request({
    url: law_pubunit_Api.delete,
    method: 'post',
    params: params
  })
}

/**
 * 保存或修改法律发布机关
 * @param {*} body 
 * @returns 
 */
export function saveOrUpdataLawPubunit(body) {
  return request({
    url: law_pubunit_Api.save,
    method: 'post',
    data: body
  })
}
